home *** CD-ROM | disk | FTP | other *** search
/ PC Zone 86 / PC Zone #086.7z / Dppcz0200.mdf / Editor.ial / Messiah / messiahpatch.exe / data1.cab / Program_Executable_Files / messiahscripts / Enemies / worker.hxx < prev   
Text File  |  1999-11-28  |  7KB  |  349 lines

  1.  
  2. Actor(WorkerOnBench)
  3. {
  4.         file(WorkerHeader);
  5.         //rank(_RankSergeantH);
  6.         rank(_RankScum);
  7.         ActorFlag(_or,_AFLAGnopossesion);
  8.         ActorFlag(_or,_AFLAGnotarget);
  9.  
  10.         startstate(StateNormal);
  11.         startaction(workerweldingonbench);
  12.  
  13.         sample(SFXWelderWhistle,-1);
  14.  
  15.         if(vaction==WorkerCrushedOnBench)
  16.         {
  17.             call(CheckAttached,_CANormal);
  18.             //if(VFrame>=200)
  19.             //{
  20. //                direction(_clr,_DIRShoot);
  21. //                call(CheckAttached,_CADropWeapon);
  22.             //}
  23.         }
  24.         else
  25.         {
  26.             if(vtrigger!=_DIRhavegun)
  27.             {
  28.                 call(CheckForPickup,12,_ClassWeapon);
  29.             }
  30.  
  31.             direction(_or,_DIRShoot);
  32.             call(CheckAttached,_CANormal);
  33.         }
  34.         //#include    "messiahscripts\enemies\copgen.hxx"
  35.         callsub(BackGroundTriggerChecks);
  36. }
  37.  
  38. Actor(WorkerKneelWelding)
  39. {
  40.     file(WorkerKneelHeader);
  41.     rank(_RankScum);
  42.     ActorFlag(_or,_AFLAGnopossesion);
  43.     ActorFlag(_or,_AFLAGnotarget);
  44.     startstate(StateNormal);
  45.     startaction(WorkerWeldingKneel);
  46.  
  47.     sample(SFXWelderWhistle,-1);
  48.  
  49.     if(Vaction==WorkerKneelCrush)
  50.     {    
  51.         if(VFrame==5)
  52.         {
  53.             sample(SFXWorkerWhatThe,-1);
  54.         }
  55.         if(VFrame<=50)
  56.         {
  57.             direction(_or,_DIRShoot);
  58.         }
  59.  
  60.         if(Vframe==50)
  61.         {
  62.             vector(_set,Gactorpos,0,50,0)
  63.             spawnparticle(fx_smallexplosion,12,gactorpos,emptyvector,fx_antirotate8); //12 should be right hand
  64.             sample(SFXBazookaExplode,-1);
  65.         }
  66.         if(VFrame==73)
  67.         {
  68.             sample(SFXWorkerOhShit,-1);
  69.         }
  70.     }
  71.     else
  72.     {
  73.         if(vtrigger!=_DIRhavegun && VState!=StateDead)
  74.         {
  75.             call(CheckForPickup,12,_ClassWeapon);
  76.         }
  77.         else
  78.         {
  79.             /*
  80.             if(Vaction==WorkerWeldingKneel || Vaction==WorkerWelding)
  81.             {
  82.                 direction(_or,_DIRShoot);
  83.             }
  84.             */
  85.         }            
  86.         call(CheckAttached,_CANormal);
  87.     }
  88.     callsub(BackGroundTriggerChecks);
  89. }
  90.  
  91. Actor(Worker)
  92. {
  93.         file(WorkerHeader);
  94.         //rank(_RankSergeantH);
  95.         rank(_RankPrivate);
  96.  
  97.         startstate(StateNormal);
  98.         //startaction(WorkerWelding0);
  99.         startaction(copidleNoGun);
  100.  
  101. /*
  102.         if(vtrigger!=_DIRhavegun)
  103.         {
  104.             direction(_set,_DIRaction);
  105.         }
  106.  
  107.         float(_declare,weldingshoot,0);
  108.         if(weldingshoot==1)
  109.         {
  110.             direction(_set,_DIRshoot);
  111.         }
  112.         else
  113.         {
  114.             direction(_clr,_DIRshoot);
  115.         }
  116.  
  117.         if(vAICon==0)
  118.         {
  119.             direction(_clr,_DIRshoot);
  120.         }
  121. */
  122.  
  123. ///////
  124. ///////
  125. ///////
  126.         if(vaicon==0)
  127.         {
  128.             call(AIcheckforonpath,10);
  129.         }
  130.         
  131.  
  132. /*        float(_declare,Count,0);
  133.         if(vaistate!=_AIstateWork && vaistate!=_AIstateWorkWeld)
  134.         {
  135.             float(_add,Count,1);
  136.             if(Count>150)
  137.             {
  138.                 break();
  139.             }
  140.         }
  141.         else
  142.         {
  143.             float(_set,Count,0);
  144.         }
  145. */
  146.  
  147.         //AI variables. All characters using copgen.hxx needs these defined to work properly
  148.         float(_declare,AIControl,0);
  149.         float(_declare,AIHideControl,_AIHCInRoute);
  150.         float(_declare,AIUsage,_AIUHideForRetreat|_AIUHideForAttack|_AIUHideAttackDefensive|_AIUHideRetreatDefensive);
  151.         float(_declare,AIAbility,_AIAJump|_AIAClimb|_AIAPickUpWeapon);
  152.         float(_declare,AIManPowerThreshold,300);
  153.         float(_declare,AIPowerRatingThreshold,50);
  154.         float(_declare,AIGrenadeThrowThreshold,10);
  155.  
  156.         #include    "messiahscripts\enemies\copgen.hxx"
  157.  
  158.  
  159. ///////
  160. ///////
  161. ///////
  162.  
  163.     /*
  164.         if(vAICon!=0)
  165.         {
  166.             if(vtrigger==_DIRhavegun)
  167.             {
  168.                 float(_declare,weldcount,0);
  169.                 if(weldcount==0)
  170.                 {
  171.                     //force anim at first
  172.                     if(vaction!=WorkerWelding0)
  173.                     {
  174.                         spawnaction(WorkerWelding0);
  175.                         float(_set,weldingshoot,1);
  176.                     }
  177.                 }
  178.                 float(_set,weldcount,1);
  179.  
  180.                 //random anims of welding
  181.                 if(vendofanim!=0)
  182.                 {
  183.                     if(vrnd<12)
  184.                     {
  185.                         if(vaction!=WorkerWelding1)
  186.                         {
  187.                             float(_set,weldingshoot,0);
  188.                             spawnaction(WorkerWelding1);
  189.  
  190.                             sample(SFXweapontorch1,-1);
  191.                         }
  192.                     }
  193.                     elseif(vrnd<12)
  194.                     {
  195.                         if(vaction!=WorkerWelding2)
  196.                         {
  197.                             float(_set,weldingshoot,0);
  198.                             spawnaction(WorkerWelding2);
  199.                         }
  200.                     }
  201.                     else
  202.                     {
  203.                         if(vaction!=WorkerWelding0)
  204.                         {
  205.                             float(_set,weldingshoot,1);
  206.                             spawnaction(WorkerWelding0);
  207.                         }
  208.                     }
  209.                 }
  210.             }
  211.  
  212.             float(_declare,assface,0);
  213.             if(assface==20)
  214.             {
  215.                 spawnactor(WeaponTorch,0,100,-50);
  216.             }
  217.             float(_add,assface,1);
  218.         }
  219.     */
  220.  
  221.         if(VTrigger==_DIRactionhold || VTrigger==_DIRaction)
  222.         {
  223.             Collision(0,0,0,0,0,-50);
  224.             if(VColMaterialProperties==_MATPush)
  225.             {
  226.                 call(MoveBackgroundObject);
  227.                 float(_set,WorkerPushingObject,1);
  228.             }
  229.             
  230.         }
  231.         else
  232.         {
  233.             float(_set,WorkerPushingObject,0);
  234.         }
  235. }
  236.  
  237. Actor(RadiationWorker)
  238. {
  239.         file(RadiationWorkerHeader);
  240.         rank(_RankScum);
  241.  
  242.         startstate(StateNormal);
  243.         startaction(copidleNoGun);
  244.  
  245.         if(vaicon==0)
  246.         {
  247.             call(AIcheckforonpath,10);
  248.         }
  249.         else
  250.         {
  251.             if(VTrigger==_DIRhavegun && VWeaponAmmoType==_AmmoBattery)
  252.             {
  253.             
  254.                 if(VWeaponAmmoLeft==1)
  255.                 {
  256.                     if(Vtrigger!=_DIRcombatmode)
  257.                     {
  258.                         direction(_set,_DIRCombatmode);
  259.                     }
  260.                 }
  261.                 if(VAction==NukeBatteryDrop)
  262.                 {
  263.                     if(VWeaponAmmoLeft==1)
  264.                     {
  265.                         if(Vframe==15) 
  266.                         {
  267.                             call(DontBlowBattery);
  268.                             call(CheckAttached,_CADropBattery);
  269.                             float(_set,VarKey2,2);
  270.                         }
  271.                     }
  272.                 }
  273.                 if(VAction==NukeBatteryPick)
  274.                 {
  275.                     if(VWeaponAmmoLeft==0)
  276.                     {
  277.                         if(VFrame==15)
  278.                         {
  279.                             call(CheckForPickup,12,_ClassPickup|_ClassBullet);
  280.                         }
  281.                     }
  282.                 }
  283.             }
  284.         }        
  285.  
  286.         //AI variables. All characters using copgen.hxx needs these defined to work properly
  287.         float(_declare,AIControl,0);
  288.         float(_declare,AIHideControl,_AIHCInRoute);
  289.         float(_declare,AIUsage,_AIUHideForRetreat|_AIUHideForAttack|_AIUHideAttackOffensive|_AIUHideRetreatDefensive|_AIUHideLeanOutAttack);
  290.         float(_declare,AIAbility,_AIAJump|_AIAClimb|_AIAPickUpWeapon);
  291.         float(_declare,AIManPowerThreshold,300);
  292.         float(_declare,AIPowerRatingThreshold,50);
  293.         float(_declare,AIGrenadeThrowThreshold,10);
  294.  
  295.         #include    "messiahscripts\enemies\copgen.hxx"
  296. }
  297.  
  298.  
  299. Actor(Welder)
  300. {
  301.         file(WelderHeader);
  302.         rank(_RankScum);
  303.  
  304.         startstate(StateNormal);
  305.         startaction(copidleNoGun);
  306.  
  307.         if(vaicon==0)
  308.         {
  309.             call(AIcheckforonpath,10);
  310.         }
  311.  
  312.         //AI variables. All characters using copgen.hxx needs these defined to work properly
  313.         float(_declare,AIControl,0);
  314.         float(_declare,AIHideControl,_AIHCInRoute);
  315.         float(_declare,AIUsage,_AIUHideForRetreat|_AIUHideForAttack|_AIUHideAttackOffensive|_AIUHideRetreatDefensive|_AIUHideLeanOutAttack);
  316.         float(_declare,AIAbility,_AIAJump|_AIAClimb|_AIAPickUpWeapon);
  317.         float(_declare,AIManPowerThreshold,300);
  318.         float(_declare,AIPowerRatingThreshold,50);
  319.         float(_declare,AIGrenadeThrowThreshold,10);
  320.  
  321.         #include    "messiahscripts\enemies\copgen.hxx"
  322. }
  323.  
  324.  
  325. Actor(Worker2)
  326. {
  327.         file(Worker2Header);
  328.         rank(_RankScum);
  329.  
  330.         startstate(StateNormal);
  331.         startaction(copidleNoGun);
  332.  
  333.         if(vaicon==0)
  334.         {
  335.             call(AIcheckforonpath,10);
  336.         }
  337.  
  338.         //AI variables. All characters using copgen.hxx needs these defined to work properly
  339.         float(_declare,AIControl,0);
  340.         float(_declare,AIHideControl,_AIHCInRoute);
  341.         float(_declare,AIUsage,_AIUHideForRetreat|_AIUHideForAttack|_AIUHideAttackOffensive|_AIUHideRetreatDefensive|_AIUHideLeanOutAttack);
  342.         float(_declare,AIAbility,_AIAJump|_AIAClimb|_AIAPickUpWeapon);
  343.         float(_declare,AIManPowerThreshold,300);
  344.         float(_declare,AIPowerRatingThreshold,50);
  345.         float(_declare,AIGrenadeThrowThreshold,10);
  346.  
  347.         #include    "messiahscripts\enemies\copgen.hxx"
  348. }
  349.